import { post } from '../../utils/fetch'
import {tmodeContentMsg, tmodeContentMsgNew, problemReport} from '../../utils/api'
import * as Libs from '../../utils/Libs'
import * as _ from 'lodash'

export const getProblemReport = async (params) => {
  return post(problemReport(params), {})
}

export const getTmodeContentMsg = async (params) => {
  return post(tmodeContentMsg(params), {})
}

export const getTmodeContentMsgAll = async (oneParams, twoParams, threeParams) => {
  return await Promise.all([
    post(tmodeContentMsg(oneParams), {}),
    post(tmodeContentMsg(twoParams)),
    post(tmodeContentMsg(threeParams))
  ])
}

export const getMainPage = async (params) => {
  return post(tmodeContentMsgNew(params), {}, 20000)
}

export const buildArrayD = (params = {}) => {
  let sumMoney = params.sumMoney || ""
  let tbSumMoney = params.tbSumMoneyStr || ""
  let onRise = params.onRise || ""
  return [
    sumMoney,
    tbSumMoney,
    onRise
  ]
}
